home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir34 / 2boot.zip / BOOT.TXT < prev    next >
Text File  |  1994-01-13  |  4KB  |  82 lines

  1.                                   BOOT.BAS
  2.                                           
  3.                               13 January, 1994
  4.                                           
  5.                                    6:27 PM
  6.                                           
  7.        I am  away from home this week on "vacation." Yeah... that's it
  8.        I'm on VACATION! But what do I do in the evenings when everyone
  9.        else has gone to bed dog tired. Me? I'm still up plinking on my
  10.        laptop  trying  to  understand  the  mysteries  of  how  MS-DOS
  11.        -really- works.
  12.        
  13.        So here  I sit  in front  of my  LCD screen, reading "The Peter
  14.        Norton PC  Programming Bible,"  (3rd Edition,  Microsoft Press,
  15.        1993). I  am stumbling  over "C" or Assembly code, as if in one
  16.        of those  Monty Python sketches where this sleazy guy sits next
  17.        to you  saying, "Know  what I  mean Governor,  nudge,  nudge...
  18.        wink, wink...  know what I mean..." But you DON'T know "what he
  19.        means" AND it's still funny.
  20.        
  21.        So I guess I do this -on vacation- because it's FUNNY.
  22.        
  23.        Anyhow and anyways, this is a program that tells you what drive
  24.        you booted from no matter if it is A: or B: or C: or D: or...?
  25.        
  26.        Well... it  WILL if  you are  running  MS-DOS  Version  4.0  or
  27.        better. If  you have an older version of DOS than 4.0, BOOT.COM
  28.        will beep at you and tell you it can't continue.
  29.        
  30.        Believe it  or no, BOOT.COM (or its source file, BOOT.BAS) is a
  31.        unique QuickBASIC  4.5 program.  A unique  program in  the true
  32.        sense of  the word  (unique n.  One of a kind, no other example
  33.        exists in  the known universe). I have scoured the highways and
  34.        byways of  QuickBASIC land  looking for  a program like this...
  35.        not because  it's so  brilliant or  hard to  do,  just  that  I
  36.        thought that  it would  be a  useful utility  to  have.  So  in
  37.        reading "Norton" this week, I stumbled across "know what I mean
  38.        nudge.. nudge...  wink, wink...  know what  I mean...."  how to
  39.        make this tiny gem and decided to share it with you.
  40.        
  41.        Up until  now the  only way  I could even close to knowing what
  42.        the boot disk was by querying:
  43.        
  44.        A$ = ENVIRON$("COMSPEC")
  45.        'if the variable is NOT null
  46.        IF LEN(A$) THEN BootDrive$ = LEFT$(A$,2)
  47.        PRINT "Your Boot Drive is: "; BootDrive$
  48.        
  49.        The  Function   ENVIRON$  -as   used  above-  finds  out  where
  50.        COMMAND.COM is loaded from AND ASSumes that this is the same as
  51.        the boot drive. Well, that was not good enough as some folk use
  52.        the SHELL  command in  the CONFIG.SYS  file to move COMMAND.COM
  53.        around (Well...  I know,  =I= do!  "know what  I  mean  nudge..
  54.        nudge... wink, wink... know what I mean....")
  55.        
  56.        I don't  have a  network to  try it  on to  see if it correctly
  57.        picks that  drive up  but since  it calls  an  MS-DOS  software
  58.        interrupt, I suspect it may work for that too. If you try it on
  59.        a network and it -works-, would you let me know?
  60.        
  61.        The executable  file BOOT.COM,  is a  plain vanilla  QuickBASIC
  62.        program LINKed  with Crescent  Software's PDQ  Library and then
  63.        compressed with  the French  FreeWare program LZEXE.EXE to make
  64.        it tiny.
  65.        
  66.        BOOT.BAS has  a fair  amount of  information about Registers in
  67.        the text  portion that  you won't  find  in  one  spot  in  one
  68.        book.... If you want to know about this CALL INTERRUPT stuff as
  69.        it applies  to QuickBASIC,  then you  need to get Ethan Winer's
  70.        book "Basic  Techniques and  Utilities" (Ziff Davis Press 1991)
  71.        BEFORE you  try  the  Norton  book.  "Norton"  is  written  for
  72.        Assembly and  "C" cats  and there  is very  little help for the
  73.        QuickBASIC aficionado.
  74.        
  75.        Get back to me if you like this program or enhance it. Get back
  76.        to me  if you  think this  is another  dumb program that I have
  77.        written that is totally useless, need to know that too... "know
  78.        what  I  mean  nudge..  nudge...  wink,  wink...  know  what  I
  79.        mean...."
  80.        
  81.        John De Palma on CompuServe 76076,571
  82.